/*
 * KakaoSender.h
 *
 *  Created on: 2013. 11. 15.
 *      Author: jjaehuny
 */

#ifndef PROJECTZ_NPROCESS_KAKAOSENDER_H_
#define PROJECTZ_NPROCESS_KAKAOSENDER_H_

#include "../NUtil/ThreadPool.h"

#include <string>
#include <vector>
#include <mutex>
#include <stack>

namespace ProjectZ { namespace NProcess {

class KakaoSender
{
public:
	struct Param {
		std::string 	_socialID;
		int				_company;
		int 			_nPrice;
		int 			_buySeq;
	};

public:
	KakaoSender();
	virtual ~KakaoSender();

public:
	void 	Push(Param & param);
	void	Flush();

private:
	void	work();

private:
	std::deque<Param> 	_clsParamVector;

	NUtil::ThreadPool		_clsThreadPool;

	std::mutex 			_mutex;
};

} /*NProcess*/ } /*ProjectZ*/

#endif /* PROJECTZ_NPROCESS_KAKAOSENDER_H_ */
